<?php
    /**
     * 
     */
     
    Yii::import('zii.widgets.CPortlet');

    class RecentComments extends CPortlet
    {
        public $maxComments=10;
        public function init()
        {
            $this->title=Yii::t('Site','RECENT COMMENT');    
            parent::init();
        }
        public function getRecentComments()
        {
            return Comment::model()->findRecentComments(10);
        }

        protected function renderContent()
        {
            $this->render('recentComments');
        }
    }
?>
